From 84128d538aa4f189c31d296d04084762ce062107 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 8 Nov 2019 19:07:47 +0100 Subject: [PATCH] build: opt out of unsafe math optimizations in reference and base This makes the reference code paths used for verifying conversions in extensions not involve for instance fast reciprocal approximations, see issue #49. The extensions are still compiled with full optimizations. --- babl/base/meson.build | 6 ++++++ babl/meson.build | 1 + 2 files changed, 7 insertions(+) diff --git a/babl/base/meson.build b/babl/base/meson.build index 97ec38b..06728de 100644 --- a/babl/base/meson.build +++ b/babl/base/meson.build @@ -16,6 +16,12 @@ babl_base_sources = [ 'type-u8.c', ] +babl_base_c_args = [ + sse2_cflags, + '-DLIBDIR="@0@"'.format(babl_libdir), + '-fno-unsafe-math-optimizations' +] + babl_base = static_library('babl_base', babl_base_sources, include_directories: [ rootInclude, bablInclude, ], diff --git a/babl/meson.build b/babl/meson.build index 542bb62..a60beb8 100644 --- a/babl/meson.build +++ b/babl/meson.build @@ -27,6 +27,7 @@ version_script_target = custom_target(version_script, babl_c_args = [ sse2_cflags, '-DLIBDIR="@0@"'.format(babl_libdir), + '-fno-unsafe-math-optimizations' ] # Linker arguments -- 2.30.2